/**
 * Created by Saxon Cheng on 2017/3/16.
 */
import * as React from "react";
import PayDemo from "./pages/paydemo"
import {Platform} from 'react-native'
import {
    Router,
    Scene,
} from 'react-native-router-flux'
import{
    StyleSheet,
    Text
}from 'react-native'
class Root extends React.Component {
    render() {
        return (
            <Router getSceneStyle={getSceneStyle} >
                <Scene key="root">
                    <Scene key="payDemo" component={PayDemo} duration={0} hideNavBar/>
                </Scene>
            </Router>
        )
    }
}

const styles = StyleSheet.create({
    container: {
        flex: 1, backgroundColor: 'transparent', justifyContent: 'center',
        alignItems: 'center',
    },
    tabBarStyle: {
        backgroundColor: '#eee',
    },
    tabBarSelectedItemStyle: {
        backgroundColor: '#ddd',
    },
});

// define this based on the styles/dimensions you use
const getSceneStyle = (/* NavigationSceneRendererProps */ props, computedProps) => {
    const style = {
        flex: 1,
        backgroundColor: '#fff',
        shadowColor: null,
        shadowOffset: null,
        shadowOpacity: null,
        shadowRadius: null,
    };
    if (computedProps.isActive) {
        style.marginTop = computedProps.hideNavBar ? 0 : (Platform.OS === 'ios' ? 64 : 54);
    }
    return style;
};
export default Root;